package com.fc.hkx.api;

import com.fc.hkx.service.ITokenService;
import com.fc.hkx.service.IUserService;
import com.fc.hkx.utils.R;
import com.fc.hkx.utils.annotation.IgnoreAuth;
import com.fc.hkx.utils.validator.Assert;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Health Check
 *
 * @author Charles
 */
@RestController
@RequestMapping("/api")
@Api("Health check api")
public class HealthCheckController {

    /**
     * Health Check
     */
    @IgnoreAuth
    @RequestMapping("/health_check/json")
    @ResponseBody
    public R health_json(){
        return R.ok("I am alive");
    }

    /**
     * Health Check
     */
    @IgnoreAuth
    @RequestMapping("/health_check/plain")
    @ResponseBody
    public String health_plain(){
        return "I am alive";
    }
}
